package com.googlecode.bip.entity;

import java.io.Serializable;
import java.util.List;

/**
 * Entry for 'questions' table - public interface
 */
public interface IQuestion extends Serializable
{
    /**
     * Return the question id (key)
     * @return the 'idquestion'
     */
    public int getIdQuestion();

    /**
     * Set the id of the question
     * @param idquestion The id of the question
     */
    public void setIdQuestion( final int idquestion );

    /**
     * Return the local id
     * @return the 'idlocal'
     */
    public String getIdLocal();

    /**
    * Set the local id
    * @param the 'idlocal'
    */
    // REQUIRED for QuestionValue (JSON)
    public void setIdLocal(String idlocal);

    /**
     * Returns the question (question name) (max length 64)
     * @return the question name
     */
    public String getName();

    /**
     * Set the question (question name) (max length 64)
     * @param name the question name to set
     */
    public void setName( String name );

    /**
     * Returns the question description/explanation (max length 255 - HTML formatted)
     * @return the description
     */
    public String getDescription();

    /**
     * Set the Question description/explanation (max length 255 - HTML formatted)
     * @param description the description to set
     */
    public void setDescription( String description );

    /**
     * Return parent 'idtopic' ({@link ITopic#getIdTopic()})
     * @return the parent 'idtopic'
     */
    public int getParentIdTopic();

    /**
     * Set the parent 'idtopic'
     * @param parentidtopic The parent 'idtopic'
     */
    public void setParentIdTopic( final int parentidtopic );

    /**
     * Returns the order of question in parent {@link ITopic}
     * @return the order of question in parent {@link ITopic}
     */
    public int getOrder();

    /**
     * Set order of question in parent {@link ITopic}
     * @param order the order of question in parent to set
     */
    public void setOrder( int order );

    /**
     * Returns minimum value for this question
     * @return the minimum value
     */
    public int getMinValue();

    /**
     * Set minimum value for this question
     * @param minvalue The minimum value
     */
    public void setMinValue( final int minvalue );

    /**
     * Returns maximum value for this question
     * @return the maximum value
     */
    public int getMaxValue();

    /**
     * Set the maximum value for this question
     * @param maxvalue The maximum value
     */
    public void setMaxValue( final int maxvalue );

    /**
     * Returns default value for this question
     * @return the default value
     */
    public int getDefaultValue();

    /**
     * Set the default value for this question
     * @param defaultvalue The default value
     */
    public void setDefaultValue( final int defaultvalue );

    /**
     * @return the isactive value.
     */
    public int getIsActive();

    /**
     * Set the  isactive value.
     * @param isactive the isactive to set
     */
    public void setIsActive( int isactive );

    /**
     * Returns true is values for this questions must be always private
     * @return true is values for this questions must be always private
     */
    public boolean isPrivate();

    /**
     * Define if values for this questions must be always private or not
     * @param isPrivate The isPrivate value.
     */
    public void setPrivate( boolean isPrivate );

    /**
     * Return text translation ({@link #getIdLocal()}) for specified value
     *
     * @param value Specified value
     * @return text translation for specified value
     * @throws IllegalValueException if value is not in valid range
     */
    public String getTextValue( int value ) throws IllegalValueException;

    // Charless: For managing text values
    // Note: I need an array of array and not a Map !
    public List<List<Object>> getListTextValues();
    public void setListTextValues(List<List<Object>> textValues);

}
